package com.bafa.front.events;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.dbcache.LeagueCache;
import com.bafa.objects.PageBean;
import com.bafa.services.UserServices;

public class ChangePasswordEvent extends Event {

	@Override
	public void doEvent(HttpServletRequest request,
			HttpServletResponse response, PageBean page) {
		UserServices.changePassword(request.getParameter("user"),request.getParameter("oldpassword"),request.getParameter("password"));
		new UserHomeEvent().doEvent(request,response,page);
		message.addMessage("Password changed successfully");

	}

}
